import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpBdappConfig {
  id!: number;
  appkey!: string;
  appSecret!: string;
  uniacid!: number;
  appId?: unknown;
  payDealid?: unknown;
  payAppKey?: unknown;
  payPrivateKey?: unknown;
  payPublicKey?: unknown;
  appPublicKey?: unknown;
}

export const ImsYzdKpBdappConfigSchema = new EntitySchema({
  class: ImsYzdKpBdappConfig,
  properties: {
    id: { primary: true, type: 'number' },
    appkey: { type: 'string', length: 255 },
    appSecret: { type: 'string', fieldName: 'appSecret', length: 255 },
    uniacid: { type: 'number', index: 'uniacid' },
    appId: { type: 'unknown', columnType: 'longtext', nullable: true },
    payDealid: { type: 'unknown', columnType: 'longtext', nullable: true },
    payAppKey: { type: 'unknown', columnType: 'longtext', nullable: true },
    payPrivateKey: { type: 'unknown', columnType: 'longtext', nullable: true },
    payPublicKey: { type: 'unknown', columnType: 'longtext', nullable: true },
    appPublicKey: { type: 'unknown', columnType: 'longtext', nullable: true },
  },
});
